package lab02.test06;

public class Ladder {
    double above;
    double bottom;
    double high;
    double area;

    public Ladder(double above, double bottom, double high) {
        this.high = high;
        this.above = above;
        this.bottom = bottom;
    }

    public void area() {
        area = ((above + bottom) * high) / 2;
        System.out.println("梯形面积是：" + area);
    }
}
